package com.utils;

public class ResponseUtils {
	private ResponseUtils() {

	}

	private static class SingleDateUtil {
		private static ResponseUtils sDataUtils = new ResponseUtils();
	}

	public static ResponseUtils getInstance() {
		return SingleDateUtil.sDataUtils;
	}

	public static <T> ResponeModel<T> createResponeModel() {
		return new ResponeModel<>();
	}

	public static <T> String commonReson(T t, String code, String message) {
		ResponeModel<T> responeModel = createResponeModel();
		responeModel.code = code;
		responeModel.message = message;
		responeModel.content = t;
		return GsonUtils.getintance().toJson(responeModel, null);
	}
}
